3.202 \(\int \frac{c+d x^n}{a+b x^n} \, dx\)

Optimal. Leaf size=42 \[ \frac{x (b c-a d) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{b x^n}{a}\right )}{a b}+\frac{d x}{b} \]

[Out]

(d*x)/b + ((b*c - a*d)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)])
/(a*b)

_______________________________________________________________________________________

Rubi [A]  time = 0.0525895, antiderivative size = 42, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.118 \[ \frac{x (b c-a d) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{b x^n}{a}\right )}{a b}+\frac{d x}{b} \]

Antiderivative was successfully verified.

[In]  Int[(c + d*x^n)/(a + b*x^n),x]

[Out]

(d*x)/b + ((b*c - a*d)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)])
/(a*b)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 6.35457, size = 31, normalized size = 0.74 \[ \frac{d x}{b} - \frac{x \left (a d - b c\right ){{}_{2}F_{1}\left (\begin{matrix} 1, \frac{1}{n} \\ 1 + \frac{1}{n} \end{matrix}\middle |{- \frac{b x^{n}}{a}} \right )}}{a b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((c+d*x**n)/(a+b*x**n),x)

[Out]

d*x/b - x*(a*d - b*c)*hyper((1, 1/n), (1 + 1/n,), -b*x**n/a)/(a*b)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0332002, size = 40, normalized size = 0.95 \[ \frac{x \left ((b c-a d) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{b x^n}{a}\right )+a d\right )}{a b} \]

Antiderivative was successfully verified.

[In]  Integrate[(c + d*x^n)/(a + b*x^n),x]

[Out]

(x*(a*d + (b*c - a*d)*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((b*x^n)/a)]))/(
a*b)

_______________________________________________________________________________________

Maple [F]  time = 0.058, size = 0, normalized size = 0. \[ \int{\frac{c+d{x}^{n}}{a+b{x}^{n}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((c+d*x^n)/(a+b*x^n),x)

[Out]

int((c+d*x^n)/(a+b*x^n),x)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[{\left (b c - a d\right )} \int \frac{1}{b^{2} x^{n} + a b}\,{d x} + \frac{d x}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^n + c)/(b*x^n + a),x, algorithm="maxima")

[Out]

(b*c - a*d)*integrate(1/(b^2*x^n + a*b), x) + d*x/b

_______________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \[{\rm integral}\left (\frac{d x^{n} + c}{b x^{n} + a}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^n + c)/(b*x^n + a),x, algorithm="fricas")

[Out]

integral((d*x^n + c)/(b*x^n + a), x)

_______________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((c+d*x**n)/(a+b*x**n),x)

[Out]

Exception raised: TypeError

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{d x^{n} + c}{b x^{n} + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((d*x^n + c)/(b*x^n + a),x, algorithm="giac")

[Out]

integrate((d*x^n + c)/(b*x^n + a), x)